<script setup name="App" lang="ts">
import { useCounterStore } from './store/counter'
// !#3 生成一个仓库实例
const counterStore = useCounterStore()
</script>
<template>
  <div>
    <p>count: {{ counterStore.count }}</p>
    <p>doubleCount: {{ counterStore.doubleCount }}</p>
    <button @click="counterStore.increment(2)">+2</button>
    <button @click="counterStore.decrement(3)">-3</button>
    <button @click="counterStore.incrementAsync(1)">+1</button>
  </div>
</template>
